﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Upload.aspx.cs" Inherits="Project.Upload" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="uploadNewVideo">
        <br />
        <table style="width: 66%">
            <tr>
                <td colspan="3">
        <asp:Label ID="Label1" runat="server" Text="Upload new video" Font-Bold="True" 
                        Font-Size="16pt"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 175px">
                    &nbsp;</td>
                <td style="width: 45px">
                    &nbsp;</td>
                <td style="width: 240px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 175px">
                    <asp:Label ID="Label2" runat="server" Text="Title"></asp:Label>
                </td>
                <td style="width: 45px">
                    &nbsp;</td>
                <td style="width: 240px">
                    <asp:TextBox ID="tbTitleVideo" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="tbTitleVideo" ErrorMessage="Required Field."></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 175px">
                    <asp:Label ID="Label3" runat="server" Text="File"></asp:Label>
                </td>
                <td style="width: 45px">
                    &nbsp;</td>
                <td style="width: 240px">
                    <asp:FileUpload ID="fuFile" runat="server" />
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="fuFile" ErrorMessage="Required Field."></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="text-align: center;" colspan="4">
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="fuFile" ErrorMessage="Only video has extension is mp4." 
                        
                        ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.mp4|.MP4)$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 175px">
                    &nbsp;</td>
                <td style="width: 45px">
                    &nbsp;</td>
                <td style="width: 240px">
                    <asp:Button ID="btnUpload" runat="server" Text="Upload" 
                        onclick="btnUpload_Click" />
                </td>
                <td>
                    <asp:Label ID="lbus" runat="server" BackColor="#99CC00"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div class="registeredUser">
        <asp:Label ID="Label4" runat="server" Text="Registered User" Font-Bold="True" 
            Font-Size="16pt"></asp:Label>
        <br />
        <asp:GridView ID="gvListUser" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
            CellPadding="3" EnableModelValidation="True" ForeColor="Black" 
            GridLines="Vertical" Width="381px">
            <AlternatingRowStyle BackColor="#CCCCCC" />
            <Columns>
                <asp:BoundField DataField="userName" HeaderText="Username" />
                <asp:BoundField DataField="fullName" HeaderText="Name" />
                <asp:BoundField DataField="origin" HeaderText="Origin" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" />
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
    </div>
</asp:Content>
